<template>
	<el-form class="fileEditForm" ref="fileInfo" :inline="true" :model="fileInfo" label-width="80px">
		<el-form-item :label="$t('system.fileName')">
			<el-input v-model="fileInfo.fileName"></el-input>
		</el-form-item>
		<el-form-item :label="$t('system.fileFcId')">
			<el-select v-model="fileInfo.fileFcId" style="width: 92%;" multiple :placeholder="$t('common.selectTips')">
				<el-option v-for="item in options.fileFcId" :key="item.fcId" :label="item.fcName" :value="item.fcId">
				</el-option>
			</el-select>
		</el-form-item>
		<el-form-item :label="$t('system.fileSize')">
			<el-input v-model="fileInfo.fileSize"></el-input>
		</el-form-item>
		<el-form-item :label="$t('system.fileSuffix')">
			<el-input v-model="fileInfo.fileSuffix"></el-input>
		</el-form-item>
		<el-form-item :label="$t('system.fileSource')">
			<el-input v-model="fileInfo.fileSource"></el-input>
		</el-form-item>
		<el-form-item >

		</el-form-item>
		<el-form-item style="width: 100%;" >
			<commonUpload />
		</el-form-item>
	</el-form>
</template>
<script>
	import request from '@/utils/request'
	import commonUpload from '@/views/common/common-upload.vue'
	export default {
		name: 'fileEdit',
		props: ['fileInfo'],
		components: {
			commonUpload
		},
		data() {
			return {
				//所有的下拉选项
				options: {
					fileFcId: [],
				}
			}
		},
		watch: {
			fileInfo: function(val) {

			}
		},
		//页面初始化加载
		created() {
			this.getFileFcId();
		},
		methods: {
			getFileFcId() {
				request({
					url: '/system/fileCategory/query',
					method: 'post'
				}).then(response => {
					this.options["fileFcId"] = response.data;
				})
			},
		}
	}
</script>
<style>
	.fileEditForm .el-form-item {
		width: 45%;
	}

	.fileEditForm .el-input {
		width: 100%;
	}
</style>
